Component({
  properties: {
    activities: Array
  },

  data: {
    showMask: false
  },

  methods: {
    viewActivity(e) {
      let id = e.currentTarget.dataset.id;
      wx.navigateTo({
        url: `/pages/subpage/@home/activity/activityDetails/activityDetails?aid=${id}`
      });
    },

    action(e) {
      let dataset = e.currentTarget.dataset;
      let activity_id = dataset.id;
      let index = dataset.index;
      this.triggerEvent("action", { activity_id, index });
    }
  }
});
